<%@page contentType="text/html; charset=UTF-8"%>
<%@ page import="org.acegisecurity.ui.AbstractProcessingFilter" %>
<%@ page import="org.acegisecurity.AuthenticationException" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
<%@ include file="/jsp/common/common.jsp"%> 
      
<title>庆能(北京)化粪池环境处理预算平台</title>

<style type="text/css">
	
.user{ background:url(images/login/user.gif) no-repeat 1px 3px;height: 25px; }   

.key{ background:url(images/login/key.gif) no-repeat 1px 3px;height: 25px;  }   

.user,.key,.key{background-color:#FFFFFF;padding-left:20px;font-weight:bold;color:#000033;}

.login{
	background-image:url(images/login/key.gif) !important;
}
	

</style>
	
	
<script type="text/javascript">


//初始化框	
$(function(){
	  $('#p').panel({ 

		  width:518, 

		  height:300, 

		  title: '登录'

		}); 		
})

function _login(){
	var user_v = $("#u_id").val();
	var password_v = $("#p_id").val();
	if(user_v==''){
		$.messager.alert('提示','请输入用户名');
		return ;
	}
	if(password_v ==''){
		$.messager.alert('提示','请输入密码');  
		return ;
	}
	//提交
	var url = "<%=basePath%>j_acegi_security_check";
	var form1 = document.getElementById("fm");
	form1.action = url;
	form1.submit();
	
}

function _reset(){
	$('#fm').form('clear');
}


if(document.addEventListener){//如果是Firefox 
	document.addEventListener("keypress",fireFoxHandler, true); 
	}else{ 
	document.attachEvent("onkeypress",ieHandler); 
	} 

	function fireFoxHandler(evt){ 
		if(evt.keyCode==13){ 
	
			_login();
		} 
	} 

	function ieHandler(evt){ 
	if(evt.keyCode==13){ 
		_login();
	} 
} 





	
</script>
	
	
</head>
  
<body background="<%=request.getContextPath()%>/images/login/bg-login.jpg">
 <form action="<%=request.getContextPath()%>/j_acegi_security_check" id="fm" method="post" name="fm">
 <table height="50%"  align="center" cellpadding="0" cellspacing="0" id="t_lg" 
	style="position:absolute; top:120px; left:400px; width: 518px;">
	
	<tr>
		<td>
		<div id="p"  title="登录"  style="background:#E8E7EA;padding:1px;" > 
		
			<div style="width: 99%;height: 60px">
				<table style="width: 100%;height:60px" border="0">
					<tr>
					<td align="center">
					<img alt="" src="<%=imgPath %>login/qingneng-login.jpg.jpg" height="50px" width="480px">
					</td>
					</tr>
				</table>
			</div>		
			<div style="width: 100%;height: 120px">
				<table style="width: 100%;height:120px" border="0">
					<tr>
					<td align="right" width="173">登录名：</td>
					<td>
					<input type="text" class="user" id="u_id" value="admin" name="j_username"></td>
					</tr>
					
				    <tr>
				    <td align="right" >密码：</td>
				    <td><input type="password" class="key" id="p_id" value="123456" name='j_password'></td>
				    </tr>
					<tr >
					<td colspan="2" align="center">
					<a href="#" class="easyui-linkbutton" iconCls="icon-ok" onclick="_login()">登录</a> &nbsp; &nbsp;&nbsp; <a href="#" class="easyui-linkbutton" iconCls="icon-no" onclick="_reset()">重置</a>
					</td>
					</tr>
					
				</table>
			</div>
			<div align="center">
				  <% 
				  String error = request.getParameter("error"); 
				  if(error!=null){
				  %>		  
			      <font color="red">
			        	用户验证失败,请重新登录!<BR><BR>
			      </font>
			   		<%} %>
			</div>	
			
 		</div>
        
  </td>
</tr>
</table>
</form>	
</body>
</html>
